﻿namespace NTLib.Core.Args
{
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;

    /// <summary>
    /// EventArgs used to notify that a value have changed.
    /// </summary>
    /// <typeparam name="T">Value Type</typeparam>
    public class ValueChangedEventArgs<T> : EventArgs
    {
        #region Ctor

        /// <summary>
        /// Initializes a new instance of the <see cref="ValueChangedEventArgs{T}"/> class.
        /// </summary>
        /// <param name="oldValue">The old value.</param>
        /// <param name="newValue">The new value.</param>
        public ValueChangedEventArgs(T oldValue, T newValue)
        {
            this.OldValue = oldValue;
            this.NewValue = newValue;
        }

        #endregion

        #region Properties

        /// <summary>
        /// Gets the new value.
        /// </summary>
        public T NewValue { get; }

        /// <summary>
        /// Gets the old value.
        /// </summary>
        public T OldValue { get; }

        #endregion
    }
}
